/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kebut.logic;

public abstract class CryptoBase {
    byte[] plain, cipher;
    String key;
    int n = 0;
    
    public byte[] getPlain() {
        return plain;
    }
    
    public byte[] getCipher() {
        return cipher;
    }
    
    public String getKey() {
        return key;
    }
    
    public void setPlain(byte[] s) {
        plain = s;
    }
    
    public void setCipher(byte[] s) {
        cipher = s;
    }
    
    public void setKey(String s) {
        key = s;
    }
    
    public void nextn(){
        if (n == key.length()-1)
            n = 0;
        else
            n++;
    }
    
    public abstract void encrypt();
    public abstract void decrypt();
}
